package com.dayou.bean;

import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import javax.jms.Queue;

@Component
public class MqQueue {
    @Value("${interview.queue}")
    private String queueName;
    @Bean("interviewQueue")
    public Queue interviewQueue(){
        return new ActiveMQQueue(queueName);
    }
}
